package com.whfc.openapi.api.fvs.controller;

import com.whfc.openapi.api.fvs.service.FvsCallbackService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：pyl
 * @date ：Created in 2022/6/22 19:01
 * @description：倍特回调接口
 */
@RestController
@RequestMapping(value = "open/api/v1/betv")
public class BetvCallbackController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private FvsCallbackService fvsCallbackService;

    @PostMapping(value = "/record/callback")
    public String recordCallback(@RequestBody String body) {
        logger.info("倍特威视报警数据:{}", body);
        fvsCallbackService.dealBetvCallback(body);
        return "ok";
    }
}
